Integrand size = 19, antiderivative size = 132 \[ \int \sec ^n(e+f x) (a+a \sec (e+f x)) \, dx=-\frac {a \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\cos ^2(e+f x)\right ) \sec ^{-1+n}(e+f x) \sin (e+f x)}{f (1-n) \sqrt {\sin ^2(e+f x)}}+\frac {a \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-\frac {n}{2},\frac {2-n}{2},\cos ^2(e+f x)\right ) \sec ^n(e+f x) \sin (e+f x)}{f n \sqrt {\sin ^2(e+f x)}} \]
-a*hypergeom([1/2, 1/2-1/2*n],[3/2-1/2*n],cos(f*x+e)^2)*sec(f*x+e)^(-1+n)* sin(f*x+e)/f/(1-n)/(sin(f*x+e)^2)^(1/2)+a*hypergeom([1/2, -1/2*n],[1-1/2*n ],cos(f*x+e)^2)*sec(f*x+e)^n*sin(f*x+e)/f/n/(sin(f*x+e)^2)^(1/2)
Time = 0.14 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.80 \[ \int \sec ^n(e+f x) (a+a \sec (e+f x)) \, dx=\frac {a \csc (e+f x) \sec ^{-1+n}(e+f x) \left ((1+n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n}{2},\frac {2+n}{2},\sec ^2(e+f x)\right )+n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+n}{2},\frac {3+n}{2},\sec ^2(e+f x)\right ) \sec (e+f x)\right ) \sqrt {-\tan ^2(e+f x)}}{f n (1+n)} \]
(a*Csc[e + f*x]*Sec[e + f*x]^(-1 + n)*((1 + n)*Hypergeometric2F1[1/2, n/2, (2 + n)/2, Sec[e + f*x]^2] + n*Hypergeometric2F1[1/2, (1 + n)/2, (3 + n)/ 2, Sec[e + f*x]^2]*Sec[e + f*x])*Sqrt[-Tan[e + f*x]^2])/(f*n*(1 + n))
Time = 0.41 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3042, 4274, 3042, 4259, 3042, 3122}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sec (e+f x)+a) \sec ^n(e+f x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right ) \csc \left (e+f x+\frac {\pi }{2}\right )^ndx\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle a \int \sec ^{n+1}(e+f x)dx+a \int \sec ^n(e+f x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \csc \left (e+f x+\frac {\pi }{2}\right )^ndx+a \int \csc \left (e+f x+\frac {\pi }{2}\right )^{n+1}dx\) |
\(\Big \downarrow \) 4259 |
\(\displaystyle a \cos ^n(e+f x) \sec ^n(e+f x) \int \cos ^{-n-1}(e+f x)dx+a \cos ^n(e+f x) \sec ^n(e+f x) \int \cos ^{-n}(e+f x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \cos ^n(e+f x) \sec ^n(e+f x) \int \sin \left (e+f x+\frac {\pi }{2}\right )^{-n-1}dx+a \cos ^n(e+f x) \sec ^n(e+f x) \int \sin \left (e+f x+\frac {\pi }{2}\right )^{-n}dx\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle \frac {a \sin (e+f x) \sec ^n(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-\frac {n}{2},\frac {2-n}{2},\cos ^2(e+f x)\right )}{f n \sqrt {\sin ^2(e+f x)}}-\frac {a \sin (e+f x) \sec ^{n-1}(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\cos ^2(e+f x)\right )}{f (1-n) \sqrt {\sin ^2(e+f x)}}\) |
-((a*Hypergeometric2F1[1/2, (1 - n)/2, (3 - n)/2, Cos[e + f*x]^2]*Sec[e + f*x]^(-1 + n)*Sin[e + f*x])/(f*(1 - n)*Sqrt[Sin[e + f*x]^2])) + (a*Hyperge ometric2F1[1/2, -1/2*n, (2 - n)/2, Cos[e + f*x]^2]*Sec[e + f*x]^n*Sin[e + f*x])/(f*n*Sqrt[Sin[e + f*x]^2])
3.3.91.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] )^(n - 1)*((Sin[c + d*x]/b)^(n - 1) Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[n]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
\[\int \sec \left (f x +e \right )^{n} \left (a +a \sec \left (f x +e \right )\right )d x\]
\[ \int \sec ^n(e+f x) (a+a \sec (e+f x)) \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )} \sec \left (f x + e\right )^{n} \,d x } \]
\[ \int \sec ^n(e+f x) (a+a \sec (e+f x)) \, dx=a \left (\int \sec {\left (e + f x \right )} \sec ^{n}{\left (e + f x \right )}\, dx + \int \sec ^{n}{\left (e + f x \right )}\, dx\right ) \]
\[ \int \sec ^n(e+f x) (a+a \sec (e+f x)) \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )} \sec \left (f x + e\right )^{n} \,d x } \]
\[ \int \sec ^n(e+f x) (a+a \sec (e+f x)) \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )} \sec \left (f x + e\right )^{n} \,d x } \]
Timed out. \[ \int \sec ^n(e+f x) (a+a \sec (e+f x)) \, dx=\int \left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )\,{\left (\frac {1}{\cos \left (e+f\,x\right )}\right )}^n \,d x \]